package api_.object_;

import com.sun.org.apache.xml.internal.res.XMLErrorResources_tr;

import javax.print.attribute.standard.MediaSize;

public class ToStringDemo
{

    public static void main(String[] args)
    {
        String s1 = new String("haha");
        String s2 = new String("haha");
        System.out.println(s1.equals(s2));
        // StringBuilder 没有重写equals
        StringBuilder stringBuilder = new StringBuilder("haha");
        // 比较必须为相同的类，否则直接报错
        System.out.println(s1.equals(stringBuilder));


    }
}
